﻿@model IEnumerable<Project_KhuyenMaiVang.Models.DonDatHang>
@{
    ViewBag.Title = "QuanLyDonDatHang";
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
}
<h2>QUẢN LÝ ĐƠN ĐẶT HÀNG</h2>
<table id="myTable" width="700" border="0" align="center" cellpadding="0" cellspacing="0">
    <thead>
        <tr class="Bg_TieuDeTable">
            <th width="40" bordercolor="#8AB657">
                STT
            </th>
            <th width="150" bordercolor="#8AB657">
                Người đặt hàng
            </th>
            <th width="100" bordercolor="#8AB657">
                Sản phẩm
            </th>
            <th width="100" bordercolor="#8AB657">
                Số lượng
            </th>
            <th bordercolor="#8AB657">
                Tình trạng đơn đặt hàng
            </th>
            <th bordercolor="#8AB657">
                &nbsp;
            </th>
        </tr>
    </thead>
    @{var i = 0;}
    @foreach (var item in Model)
    {
        i++;
        <tr>
            <td>@Html.Label(i.ToString())
            </td>
            <td>@Html.Label(item.NguoiDatHang)
            </td>
            <td>@Html.Label(item.TenSanPham)
            </td>
            <td>@Html.Label(item.SoLuong.ToString())
            </td>
            <td>@Html.Label(item.TinhTrangDonHang)
            </td>
            <td>
                <a href =@Url.Action("update", "QuanLyDonDatHang", new { idOrder = item.MaDonDatHang })>
                    <img src="../../Content/Images/update.png" /></a> <a href =@Url.Action("delete", "QuanLyDonDatHang", new { idOrder = item.MaDonDatHang })>
                        <img src="../../Content/Images/delete.png" /></a>
            </td>
        </tr>
    }
</table>
<script src="../../Scripts/jquery-1.5.1.min.js" type="text/javascript"></script>
<script src="../../Scripts/jquery.tablesorter.js" type="text/javascript"></script>
<script src="../../Scripts/jquery.tablesorter.pager.js" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $("#myTable").tablesorter();
        $("#myTable").hide();
        $("#myTable").toggle(500);
    }
); 
</script>
